package com.jinniulive.platform.activity;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.support.v7.app.AppCompatActivity;

import com.jinniulive.platform.R;
import com.jinniulive.platform.module.login.LoginActivity;

public class StartPageActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_start_page);
        //引导页 第一次安装
        SharedPreferences sharedPreferences = getSharedPreferences("isOne", MODE_PRIVATE);
        //is true
        SharedPreferences.Editor edit = sharedPreferences.edit();
        edit.putBoolean("is", true);
        edit.commit(); //提交
        // 定时器
        CountDownTimer cdt = new CountDownTimer(1000,1000) {
            @Override
            public void onTick(long millisUntilFinished) {

            }
            @Override
            public void onFinish() {
                startActivity(new Intent(StartPageActivity.this, LoginActivity.class));
                finish();
            }
        };
        cdt.start();
    }
}
